<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>登录页</title>
<%@ include file="/common/meta.jsp"%>
<script type="text/javascript">
Ext.QuickTips.init();
Ext.onReady(function(){
	var loginForm = new Ext.form.FormPanel({
		//title:"请登录",
		bodyStyle: 'padding:5px',
		baseCls: 'x-plain',
        //layout:'absolute',
		defaultType: 'textfield',
		//method:'POST',
		//url:'${ctx}/j_spring_security_check',
		labelAlign: 'left',
		hideLabels: false,
		labelWidth: 65, 
		labelPad: 8,
        //frame:true,
        //width:300,
		defaults:{
			msgTarget:'qtip',
			abelSeparator: ':' // override labelSeparator layout config
		},
		items:[
			{
			    fieldLabel: '登录名',
			    name: 'j_username',
			    allowBlank: false,
			    maxLength:40,
			    anchor:'100%'
			},{
			    fieldLabel: '密码',
			    name: 'j_password',
			    allowBlank:false,
			    maxLength:40,
			    anchor:'100%',
			    inputType:'password'
			}
		]
	});
	
	//loginForm.render(document.body);
	
	var w = new Ext.Window({
        title: '欢迎光临！',
        collapsible: false,
        maximizable: false,
        closable:false,
        minimizable:false,
    	resizable:false,
        layout: 'fit',
        plain: true,
        width: 350,
        height:150,
        bodyStyle: 'padding:5px;',
        buttonAlign: 'center',
        items: loginForm,
		buttons: [{
            text: '登录',
            handler:function(b,e){
            	loginForm.getForm().getEl().dom.action='${ctx}/j_spring_security_check';
            	loginForm.getForm().getEl().dom.submit();
            }
        }]
    });
    w.show();
});
</script>
</head>
<body >
</body>
</html>

